home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cnews004.zip / FF.ZIP / DTA.C < prev    next >
Text File  |  1987-06-02  |  441b  |  25 lines

  1. #include <dos.h>
  2. /* Set DTA address */
  3. set_DTA(seg,off)
  4. unsigned seg, off;
  5. {
  6. union REGS inregs;
  7. struct SREGS segregs;
  8. inregs.h.ah=0x1a;
  9. segregs.ds=seg;
  10. inregs.x.dx=off;
  11. int86x(0x21,&inregs,&inregs,&segregs);
  12. }
  13.  
  14. /* Get current DTA address */
  15. get_DTA(seg,off)
  16. unsigned *seg, *off;
  17. {
  18. union REGS inregs;
  19. struct SREGS segregs;
  20. inregs.h.ah=0x2f;
  21. int86x(0x21,&inregs,&inregs,&segregs);
  22. *seg=segregs.es;
  23. *off=inregs.x.bx;
  24. }
  25.